package com.demon.example.constants;

import com.demon.framework.common.retcode.BaseRetCode;
import lombok.Getter;
import lombok.ToString;

/**
 * 业务相关错误码
 *
 * @author Demon-HY
 */
@Getter
@ToString
public final class UserRetCode extends BaseRetCode {

    // 用户
    /**
     * 用户不存在
     */
    public static final RetCode ERR_NO_SUCH_ACCOUNT = RetCode.newInstance("用户账号不存在", "ERR_NO_SUCH_ACCOUNT");
    /**
     * 用户不存在
     */
    public static final RetCode ERR_USER_NOT_FOUND = RetCode.newInstance("用户不存在", "ERR_USER_NOT_FOUND");
    /**
     * 禁止修改账号信息
     */
    public static final RetCode ERR_REVISE_ACCOUNT_FORBIDDEN = RetCode.newInstance("禁止修改账号信息", "ERR_REVISE_ACCOUNT_FORBIDDEN");
    /**
     * 创建用户失败
     */
    public static final RetCode ERR_CREATE_USER_FAILED = RetCode.newInstance("创建用户失败", "ERR_CREATE_USER_FAILED");
    /**
     * 设置用户属性失败
     */
    public static final RetCode ERR_SET_USER_ATTR_FAILED = RetCode.newInstance("设置用户属性失败", "ERR_SET_USER_ATTR_FAILED");
    /**
     * 删除用户失败
     */
    public static final RetCode ERR_DELETE_USER_FAILED = RetCode.newInstance("删除用户失败", "ERR_DELETE_USER_FAILED");
    /**
     * 该账号已被使用
     */
    public static final RetCode ERR_ACCOUNT_EXIST = RetCode.newInstance("该账号已被使用", "ERR_ACCOUNT_EXIST");
    /**
     * 手机已被使用
     */
    public static final RetCode ERR_PHONE_USED = RetCode.newInstance("手机已被使用", "ERR_PHONE_USED");
    /**
     * 邮箱已被使用
     */
    public static final RetCode ERR_EMAIL_USED = RetCode.newInstance("邮箱已被使用", "ERR_EMAIL_USED");
    /**
     * 无效手机号
     */
    public static final RetCode ERR_ILLEGAL_PHONE = RetCode.newInstance("无效手机号", "ERR_ILLEGAL_PHONE");
    /**
     * 无效密码
     */
    public static final RetCode ERR_ILLEGAL_PASSWORD = RetCode.newInstance("无效密码", "ERR_ILLEGAL_PASSWORD");
    /**
     * 用户信息损坏
     */
    public static final RetCode ERR_USER_INFO_BROKEN = RetCode.newInstance("用户信息损坏", "ERR_USER_INFO_BROKEN");
    /**
     * 密码错误
     */
    public static final RetCode ERR_WRONG_PASSWORD = RetCode.newInstance("密码错误", "ERR_WRONG_PASSWORD");
    /**
     * 设置密码失败
     */
    public static final RetCode ERR_RESET_PASSWORD_FAILED = RetCode.newInstance("设置密码失败", "ERR_RESET_PASSWORD_FAILED");
    /**
     * 不能删除自己
     */
    public static final RetCode ERR_DELETE_SELF_FORBITEN = RetCode.newInstance("不能删除自己", "ERR_DELETE_SELF_FORBITEN");
    /**
     * 用户已被锁定
     */
    public static final RetCode ERR_USER_LOCKED = RetCode.newInstance("用户已被锁定", "ERR_USER_LOCKED");
    /**
     * 用户已登录使用
     */
    public static final RetCode ERR_USER_ALREADY_USED = RetCode.newInstance("用户已登录使用", "ERR_USER_ALREADY_USED");
    /**
     * 验证码已过期,请重新获取
     */
    public static final RetCode ERR_REGISTER_CONFIRM_EXPIRED = RetCode.newInstance("验证码已过期,请重新获取", "ERR_REGISTER_CONFIRM_EXPIRED");
    /**
     * 找回密码邮件过期
     */
    public static final RetCode ERR_RETRIEVE_EMAIL_EXPIRED = RetCode.newInstance("找回密码邮件过期", "ERR_RETRIEVE_EMAIL_EXPIRED");
    /**
     * 无效的用户名
     */
    public static final RetCode ERR_ILLEGAL_USER_NAME = RetCode.newInstance("无效的用户名", "ERR_ILLEGAL_USER_NAME");
    /**
     * 不能删除系统初始创建的serverAdmin用户
     */
    public static final RetCode ERR_INIT_SERVERADMIN_USER = RetCode.newInstance("不能删除系统初始创建的serverAdmin用户", "ERR_INIT_SERVERADMIN_USER");
    /**
     * 用户已被删除
     */
    public static final RetCode ERR_USER_DELETE = RetCode.newInstance("用户已被删除", "ERR_USER_DELETE");

    // 校验
    /**
     * 无效令牌
     */
    public static final RetCode ERR_TOKEN = RetCode.newInstance("无效令牌", "ERR_TOKEN");
    /**
     * 手机号已经被绑定
     */
    public static final RetCode ERR_PHONE_ALREADY_BOUND = RetCode.newInstance("手机号已经被绑定", "ERR_PHONE_ALREADY_BOUND");
    /**
     * 请不要重复发送验证码
     */
    public static final RetCode ERR_SEND_CODE_FREQUENTLY = RetCode.newInstance("请不要重复发送验证码", "ERR_SEND_CODE_FREQUENTLY");
    /**
     * 验证码过期
     */
    public static final RetCode ERR_VALIDATE_CODE_EXPIRED = RetCode.newInstance("验证码过期", "ERR_VALIDATE_CODE_EXPIRED");
    /**
     * 验证码错误
     */
    public static final RetCode ERR_INVALID_VALIDATE_CODE = RetCode.newInstance("验证码错误", "ERR_INVALID_VALIDATE_CODE");
    /**
     * 请登录
     */
    public static final RetCode ERR_USER_NOT_LOGIN = RetCode.newInstance("请登录", "ERR_USER_NOT_LOGIN");
    /**
     * 请登录,Token没找到
     */
    public static final RetCode ERR_TOKEN_NOT_FOUND = RetCode.newInstance("请登录", "ERR_TOKEN_NOT_FOUND");
    /**
     * 请重新登录,Token过期
     */
    public static final RetCode ERR_TOKEN_EXPIRED = RetCode.newInstance("请重新登录", "ERR_TOKEN_EXPIRED");
    /**
     * 清除用户数据失败
     */
    public static final RetCode ERR_CLEAN_ACCOUNT_FAILED = RetCode.newInstance("清除用户数据失败", "ERR_CLEAN_ACCOUNT_FAILED");
    /**
     * 注册登录信息失败
     */
    public static final RetCode ERR_ADD_LOGIN_ID_FAILED = RetCode.newInstance("注册登录信息失败", "ERR_ADD_LOGIN_ID_FAILED");
    /**
     * 登录的用户与新建token用户不为一个用户
     */
    public static final RetCode ERR_TOKEN_UID_MISMATCHING = RetCode.newInstance("登录的用户与新建token用户不为一个用户", "ERR_TOKEN_UID_MISMATCHING");
    /**
     * 非法手机号
     */
    public static final RetCode ERR_ILLEGAL_PHONE_ACCOUNT = RetCode.newInstance("非法手机号", "ERR_ILLEGAL_PHONE_ACCOUNT");
    /**
     * 非法账号类型
     */
    public static final RetCode ERR_ILLEGAL_ACCOUNT_TYPE = RetCode.newInstance("非法账号类型", "ERR_ILLEGAL_ACCOUNT_TYPE");
    /**
     * 非法邮箱
     */
    public static final RetCode ERR_ILLEGAL_EMAIL_ACCOUNT = RetCode.newInstance("非法邮箱", "ERR_ILLEGAL_EMAIL_ACCOUNT");
    /**
     * 账号或密码错误，请重新输入
     */
    public static final RetCode ERR_ACCOUNT_OR_PASSWORD = RetCode.newInstance("账号或密码错误，请重新输入", "ERR_ACCOUNT_OR_PASSWORD");


}
